package com.glsc.ngateway.common.base.domain.mysql.gateway.ldap;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * @Author: libj
 * @Date: 2021/10/28
 * @Desc: 部门信息表，数据采集自EHR
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@Entity
@Table(name = "t_ldap_ehr_dept")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class LdapEhrDept {

    @Id
    @Column(name = "depid")
    protected Integer depid;

    @Column(name = "dtitle", length = 100)
    protected String dtitle;

    @Column(name = "comptitle", length = 200)
    protected String comptitle;

    @Column(name = "adminid")
    protected Integer adminid;

    @Column(name = "atitle", length = 100)
    protected String atitle;

    @Column(name = "depgrade", length = 100)
    protected String depgrade;

    @Column(name = "leader", length = 100)
    protected String leader;

    @Column(name = "lname", length = 200)
    protected String lname;

    @Column(name = "oa_dept_id")
    protected Integer oaDeptId;

    @Column(name = "super_oa_dept_id")
    protected Integer superOaDeptId;

    @Column(name = "super_dept_id")
    protected Integer superDeptId;

    @Column(name = "canceled")
    private String canceled;


    @Transient
    protected String leaderEmail;

    @Transient
    protected LdapEhrDept parentDeptInfo;

}
